package com.qf.smsplatform.common.exception;

import com.qf.smsplatform.common.enums.SmsPlatformEnums;
import lombok.Data;

import java.util.Set;

/**
 * @Author: LeeRui
 * 2021/1/26 下午12:47
 **/
//自定义异常
@Data
public class SmsPlatfromEx extends RuntimeException{

    //code
    private Integer code;

    private Set<String> data;

    public SmsPlatfromEx(Integer code,String message) {
        super(message);  //父类自带message
        this.code = code;
    }

    public SmsPlatfromEx(SmsPlatformEnums enums) {
        super(enums.getMessage());
        this.code = enums.getCode();
    }

    public SmsPlatfromEx(SmsPlatformEnums enums,Set<String> data) {
        super(enums.getMessage());
        this.code = enums.getCode();
        this.data = data;
    }


}
